<template>
  <view>
    <TabSelector :tabs="tabs" :initialIndex="0" @change="handleChange" />
    <view v-if="flag == 0">
      <!-- 礼包内容 -->
    </view>
    <view v-else-if="flag == 1">
      <!-- 明细内容 -->
    </view>
    <view v-else-if="flag == 2">
      <!-- 充值内容 -->
      <Gift />
    </view>
  </view>
</template>

<script setup lang="ts">
import { ref } from 'vue'
import TabSelector from '../MyMoney/TabSelector.vue'
import Gift from './Gift.vue'
interface TabItem {
  label: string
  value: string
}
const money = ref(0)
const tabs: TabItem[] = [
  { label: '余额', value: 'balance' },
  { label: '明细', value: 'Details' },
  { label: '充值', value: 'recharge' },
]
const flag = ref(0)
const handleChange = (index: number) => {
  flag.value = index
}
</script>

<style scoped></style>
